package tasks 
{
	import flash.events.Event;
	import flash.events.EventDispatcher;
	/**
	 * ...
	 * @author Dmitriy Gaiduk
	 */
	
	 /**
	  * When stats chenged
	  * @eventType = flash.events.Event
	  */
	 [Event(name="change", type="flash.events.Event")]
	public class BaseTask extends EventDispatcher
	{
		protected var _ready:Boolean;
		
		public function BaseTask() 
		{
			_ready = false;
		}
		
		public function run():void
		{
			
		}
		
		protected function complete(isReady:Boolean):void
		{
			_ready = isReady;
			dispatchEvent(new Event(Event.CHANGE));
		}
		
		public function destroy():void
		{
			
		}
		
		public function get ready():Boolean 
		{
			return _ready;
		}
		
	}

}